<?

$fs_inv_ctl_suppliers = new Fieldset (array (
	db_conn=>$_GLOBAL_DBH,
	relation=>"inv_ctl_suppliers",
	title=>"Inventory Suppliers",
	fieldset=>array (
		array (name=>"id",label=>"ID",type=>"numeric",
				value=>$_REQUEST["supplier_id"],
				input=>"hidden",primary_key=>true),
		array (name=>"name",label=>"Name",type=>"alphanumeric",
				input=>"field"),
		array (name=>"contact",label=>"Contact",type=>"character",
				input=>"field"),
		array (name=>"contact_title",label=>"Contact Title",type=>"character",
				input=>"field", optional=>true),
		array (name=>"address_1",label=>"Address 1",type=>"alphanumeric",
				input=>"field"),
		array (name=>"address_2",label=>"Address 2",type=>"alphanumeric",
				input=>"field", optional=>true),
		array (name=>"city",label=>"City",type=>"character",
				input=>"field"),
		array (name=>"postal",label=>"Postal",type=>"numeric",
				input=>"field"),
		array (name=>"state_id",label=>"State",type=>"any",
				relation=>array(foreign=>"vertical_acl_test.states",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM vertical_acl_test.states",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"country_id",label=>"Country",type=>"any",
				relation=>array(foreign=>"vertical_acl_test.countries",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM vertical_acl_test.countries",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"phone_1",label=>"Phone 1",type=>"phone",
				input=>"field"),
		array (name=>"phone_2",label=>"Phone 2",type=>"phone",
				input=>"field", optional=>true),
		array (name=>"fax",label=>"Fax",type=>"character",
				input=>"field", optional=>true),
	),
));

$fs_inv_ctl_suppliers->parse ();

?>
